#include "game.h"
#include "mainwindow.h"
#include "rule.h"
#include "ui_game.h"

game::game(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::game)
{
    ui->setupUi(this);
}

game::~game()
{
    delete ui;
}

void game::on_pushButton_clicked()
{
    MainWindow *w=new MainWindow();
    w->setFixedSize(500,550);//设置窗口大小
    w->setWindowTitle("2048");//设置窗口标题
    w->show();
    this->close();

}

void game::on_pushButton_2_clicked()
{
    rule *x=new rule();
    x->setFixedSize(500,500);
    x->setWindowTitle("规则");
    x->show();

}
